package AIR2::Searcher::ActiveSources;
use strict;
use warnings;
use base qw( AIR2::Searcher::Sources );
use Carp;
use Data::Dump qw( dump );
use Search::Query::Clause;

sub parse_query {
    my ( $self, $q, $meta_map ) = @_;
    my $query = $self->SUPER::parse_query( $q, $meta_map );
    my $clause = Search::Query::Clause->new(
        field => 'src_status',
        op    => ':',
        value => 'A'
    );
    $query->add_and_clause($clause);
    if ( !defined $query ) {
        croak "failed to add clause $clause";
    }
    $self->log("added active src_status to query: '$query'");
    return $query;
}

1;
